package com.bml.architect.seata.controller;

import com.bml.architect.seata.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: baiml
 * @Title: AccountController
 * @ProjectName: 中台技术平台
 * @Depart 中台研发部
 * @Description:
 * @date: 2021/5/12 9:02
 */
@RestController
@RequestMapping("/account/")
public class AccountController {

    @Autowired
    private AccountService accountService;

    @GetMapping("/debut")
    Boolean debit(@RequestParam("userId") String userId, @RequestParam("money") int money){

        return accountService.debit(userId,money);
    }
}
